#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "aes.h"

int main()
{
    uint8_t key[16] = { 0x62, 0x69, 0x61, 0x6E, 0x78, 0x69, 0x65, 0x32, 0x32, 0x30, 0x32, 0x5F, 0x32, 0x32, 0x30, 0x33 };
    uint8_t in[1000]  = { 0x68, 0x65, 0x6c, 0x6c, 0x6f};
    // uint8_t in[1000]  = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71 };

    uint8_t out[16] = { 0x18, 0xca, 0x09, 0x0c, 0x19, 0xe5, 0xf3, 0xb4, 0x1d, 0x19, 0xfa, 0xf5, 0x31, 0x41, 0xb5, 0x0a };
    uint8_t iv[16]  = { 0x66, 0x72, 0x61, 0x6D, 0x65, 0x64, 0x61, 0x74, 0x61, 0x70, 0x61, 0x72, 0x74, 0x61, 0x65, 0x73 };

    size_t cipherLen = AES128_CBC_encrypt(key, iv, in, 5, sizeof(in));
    size_t plainLen = AES128_CBC_decrypt(key, iv, in, cipherLen);
    return 0;
}
